############################################################
## SHOW PRODUCT SOLD THUMBNAIL CUSTOMER HISTORY v2.1
############################################################
##
## Create by Reflex Ocasion
## (http://www.reflex-ocasion.com.es)
##
## Based and adapted on the contribution
##
## lytebox
## (http://addons.oscommerce.com/info/7298)
## by madmaxx
##
############################################################
## FILES AFFECTED
############################################################
##
## catalog/account_history_info.php
##
############################################################
## BACK UP - BACK UP - BACK UP - BACK UP - BACK UP - BACK UP
############################################################


Upload all files to the folder catalog


OPEN catalog/account_history_info.php
------------------------------------------------------------
FIND
------------------------------------------------------------

  require('includes/application_top.php');

------------------------------------------------------------
INSERT AFTER

//  define(ORDERS_IMAGE_HEIGHT, 50);
  define(ORDERS_IMAGE_WIDTH, 50);


------------------------------------------------------------
FIND
------------------------------------------------------------

</head>

------------------------------------------------------------
INSERT BEFORE

<link rel="stylesheet" type="text/css" href="lytebox.css" media="screen">
<script type="text/javascript" src="js/lytebox.js"></script>


------------------------------------------------------------
FIND
------------------------------------------------------------

  for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
    echo '          <tr>' . "\n" .
         '            <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
         '            <td class="main" valign="top">' . $order->products[$i]['name'];


------------------------------------------------------------
REPLACE WITH 
------------------------------------------------------------

  for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {

    $orders_products_pic_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int)$order->products[$i]['id'] . "'");
    $orders_products_pic = tep_db_fetch_array($orders_products_pic_query);

      echo '          </td>' . "\n" .
           '            <td class="main" valign="top" align="left"><a href='.tep_href_link(DIR_WS_IMAGES . $orders_products_pic['products_image']) . ' target="_blank" rel="lytebox[group]" title='.$order->products[$i]['name'].'>'.tep_image(DIR_WS_IMAGES . $orders_products_pic['products_image'], $order->products[$i]['name'], ORDERS_IMAGE_WIDTH,  ORDERS_IMAGE_HEIGHT) . '</a></td>' . "\n" .         '            <td class="main" valign="top" align="right" width="30">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" .
         '            <td class="main" valign="top">' . $order->products[$i]['name'] . "\n";


------------------------------------------------------------
SAVE and CLOSE catalog/account_history_info.php
------------------------------------------------------------

